package ai.people.netmon.telegram.mapper;

import ai.people.netmon.framework.domain.telegram.entity.Channels;
import ai.people.netmon.framework.domain.telegram.vo.channels.AnalyzedChannels;
import ai.people.netmon.framework.domain.telegram.vo.channels.ChatMessage;
import ai.people.netmon.framework.domain.telegram.vo.channels.SimilarChannels;
import ai.people.netmon.framework.domain.telegram.vo.channels.UserMember;
import ai.people.netmon.framework.model.response.PageResponse;
import ai.people.netmon.telegram.domain.request.AnalyzedListRequest;
import ai.people.netmon.telegram.domain.request.channels.AccountMemberRequest;
import ai.people.netmon.telegram.domain.request.channels.ChartMessageRequest;
import ai.people.netmon.telegram.domain.request.channels.KeyGoalsRequest;
import ai.people.netmon.telegram.domain.request.channels.SimilarChannelsRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Set;

/**
 * 群组分析服务映射器
 *
 * @author yuanqinglong
 * @date 2022/1/11 20:25
 */
@Mapper
public interface ChannelsAnalysisServiceMapper extends BaseMapper<Channels> {


    /**
     * 成员列表
     *
     * @param channelsMemberParameter 群组成员参数
     * @return {@link PageResponse}<{@link UserMember}>
     */
    List<UserMember> memberList(AccountMemberRequest channelsMemberParameter);


    /**
     * 成员数
     *
     * @param channelsMemberParameter 群组成员参数
     * @return {@link Long}
     */
    long memberCount(AccountMemberRequest channelsMemberParameter);

    /**
     * 关键目标
     *
     * @param keyGoalsParameter 关键目标参数
     * @return {@link Object}
     */
    Object keyGoals(KeyGoalsRequest keyGoalsParameter);

    /**
     * 聊天信息
     *
     * @param chartMessageParameter 聊天信息参数
     * @return {@link PageResponse}<{@link ChatMessage}>
     */
    List<ChatMessage> chatMessage(ChartMessageRequest chartMessageParameter);


    /**
     * 聊天信息统计
     *
     * @param chartMessageParameter 聊天信息参数
     * @return {@link PageResponse}<{@link ChatMessage}>
     */
    Long chatMessageCount(ChartMessageRequest chartMessageParameter);

    /**
     * 同类群组
     *
     * @param similarChannelsParameter 同类群组参数
     * @return {@link List}<{@link SimilarChannels}>
     */
    List<SimilarChannels> similarChannels(SimilarChannelsRequest similarChannelsParameter);


    /**
     * 已添加分析群组
     *
     * @param analyzedListRequest 参数
     * @return {@link List}<{@link AnalyzedChannels}>
     */
    List<AnalyzedChannels> analyzedChannels(AnalyzedListRequest analyzedListRequest);


    /**
     * 已添加分析群组id
     *
     * @param analyzedListRequest 分析列表请求
     * @return {@link Set}<{@link String}>
     */
    Set<String> analyzedChannelsIdSet(AnalyzedListRequest analyzedListRequest);

    /**
     * 添加群组
     *
     * @param url url
     */
    int addChannels(String url);
}
